package com.wutianyi.utils;

import javax.servlet.http.HttpServletRequest;

import org.apache.commons.lang.StringUtils;

public class NetUtils
{
    public static String getParameterString(HttpServletRequest request, String name, String defaultValue)
    {
        if (StringUtils.isBlank(name))
        {
            return defaultValue;
        }
        String value = request.getParameter(name);
        if (StringUtils.isNotBlank(value))
        {
            return value;
        }
        return defaultValue;
    }
}
